@import "../../../base/less/mixins";

.widget-function('import_google_font');

.sow-form-field {
	display: block;
	margin-bottom: 1em;
	.clearfix();

	> label {
		display: block;
		margin-bottom: 5px;

		@label_width: default;
		@label_align: default;
		width: @label_width;
		text-align: @label_align;

		strong {
			@label_font_family: default;
			@label_font_weight: default;
			.font(@label_font_family, @label_font_weight);

			@label_font_size: default;
			@label_font_color: default;
			font-size: @label_font_size;
			color: @label_font_color;
		}

		&.sow-form-field-label-left {
			float: left;
			margin-right: 10px;
		}

		&.sow-form-field-label-right {
			float: right;
			margin-left: 10px;
		}
	}

	.sow-field-container {
		overflow: hidden;
		display: block;

		textarea:focus,
		input:focus,
		> :focus {
			@outline_style: solid;
			@outline_color: default;
			@outline_width: 1px;

			// NB: Do not optimize this into a single line, otherwise the removal of 'default' values won't work.
			outline-style: @outline_style;
			outline-color: @outline_color;
			outline-width: @outline_width;
		}
	}

	textarea,
	input.sow-text-field {
		.box-sizing(border-box);
		display: block;
		width: 100%;
		border-radius: 0;
	}

	&.sow-form-field-checkboxes {
		ul {
			list-style: none;
			margin: 0;
			padding: 0;

			li {
				margin: 0;
			}

			label {
				margin-bottom: 0;
			}

			input {
				float: left;
				margin: 0.4em 0.5em 0 0;
			}
		}
	}

	@description_font_size: 0.9em;
	@description_font_color: #999999;
	@description_font_style: italic;

	.sow-form-field-description {
		font-size: @description_font_size;
		margin-top: 0.2em;
		margin-left: 0.2em;
		color: @description_font_color;
		font-style: @description_font_style;
	}
}

.sow-recaptcha {
	margin-bottom: 1em;
}

.sow-contact-form {
	// Container Background
	@container_background: default;
	@container_padding: 10px;

	// Container border
	@container_border_color: #c0c0c0;
	@container_border_width: 1px;
	@container_border_style: solid;

	padding: @container_padding;
	border: @container_border_color @container_border_style @container_border_width;
	background-color: @container_background;

	.sow-error {
		@error_background: #fce4e5;
		@error_border: #ec666a;
		@error_text: #ec666a;
		@error_padding: 5px;
		@error_margin: 10px;

		background: @error_background;
		border: 1px solid @error_border;
		color: @error_text;
		border-radius: 2px;
		padding: @error_padding;
		font-size: 0.8em;
		list-style: none;
		margin: 0 0 @error_margin 0;

		li {
			margin: 0;
		}
	}

	.sow-submit-wrapper {

		.sow-submit {

		}

		.sow-submit:disabled {

		}

	}

	.sow-submit-styled {

		@submit_background_color: #eeeeee;
		@submit_background_gradient: 10%;
		@submit_border_color: #989a9c;
		@submit_border_style: solid;
		@submit_border_width: 1px;
		@submit_border_radius: 3px;
		@submit_text_color: #5a5a5a;
		@submit_font_size: default;
		@submit_weight: 500;
		@submit_padding: 10px;

		@submit_inset_highlight: 50%;

		.sow-submit {
			color: @submit_text_color;
			.gradient(
				lighten(@submit_background_color, @submit_background_gradient),
				darken(@submit_background_color, @submit_background_gradient),
				lighten(@submit_background_color, @submit_background_gradient)
			);

			border: @submit_border_width @submit_border_style @submit_border_color;
			border-radius: @submit_border_radius;
			font-weight: @submit_weight;
			font-size: @submit_font_size;
			padding: @submit_padding @submit_padding * 2;
			display: inline-block;

			.sow-submit-box-shadow (@percent) when (@percent > 0%) {
				box-shadow: inset 0 -1px 0 fade( #ffffff, @percent );
			}

			.sow-submit-box-shadow( @submit_inset_highlight );
		}

		.sow-submit:disabled {
			color: lighten(@submit_text_color, 50%);
			background: lighten(@submit_background_color, 50%);
			border: @submit_border_width @submit_border_style lighten(@submit_border_color, 20%);

		}


	}
}
